package com.shigen.demo.entity.req;

import com.shigen.demo.bean.PageRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

public class BaseUserFileReq {

  @EqualsAndHashCode(callSuper = true)
  @Data
  @ApiModel(value = "查询父文件夹下的文件")
  public static class QueryByFolder extends PageRequest {

    @ApiModelProperty(value = "父文件夹的id")
    private String folderId;
  }

  @Data
  @ApiModel(value = "重命名文件请求")
  public static class Rename {

    @ApiModelProperty(value = "新的文件名")
    @NotEmpty(message = "新的文件名不能为空")
    private String newName;

    @ApiModelProperty(value = "文件id")
    @NotNull(message = "文件的id不能为空")
    private Long id;
  }

}
